<?php
/**
 * Created by PhpStorm.
 * User: mj
 * Date: 17-6-26
 * Time: 下午3:17
 */

namespace App\Winged\Evaluation\Api;


class Patients extends Api
{

    public static $actions = [
        'patient_list' => 'user_info/get_patient_list',
        'info'         => 'user_info/get_patient_info',
        'sc_list' => 'consulting/get_service_compose_list',
    ];

    /**
     * 获取患者列表
     */
    public static function getPatientList($data = [])
    {
        $default = [
            'user_id' => user_id() ,
            'department_id' => department_id() ,
            'search_key' 	=> "" ,
            'sc_status'    => "" ,
            'current_order_status' => '',
            'patient_user_id' => "" ,
            'page_index'	  => "0" ,
            'page_size'		  => '15' ,
        ];
        $data = array_merge($default , $data);
        return static::doPost('patient_list',$data);
    }

    /**
     * 获取患者的服务组合列表
     */
    public static function getServiceComposerList($data = [])
    {
        $default = [
            "user_id" => user_id() ,
            "sc_status" => "",
            "patient_id" =>  "" ,
            "doctor_user_id" =>  "" ,
            "order_status" => "",
            "page_index" => "0" ,
            "page_size" => "0" ,
            "search_key"    => "15",
        ];
        $data = array_merge($default , $data);
        return static::doPost('sc_list',$data);
    }

    /**
     * 患者详情
     */
    public function info($patient_id)
    {
        $data = ['user_id' => user_id() , 'patient_id' => $patient_id];
        return static::doPost('info',$data);
    }


}
